package com.ruoyi.project.system.controller;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/index")
public class indexController {

    @Autowired
    private SysUserMapper sysUserMapper;

    @GetMapping("/statistic")
    public AjaxResult indexStatistic() {
        AjaxResult result = AjaxResult.success()
                .put("uc", sysUserMapper.userCount())
                .put("qc", sysUserMapper.queryCount())
                .put("pc", sysUserMapper.payCount())
                .put("sp", sysUserMapper.sumPricing());
        return result;
    }

}
